#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <extractpdf.h>
#include <QFileInfoList>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    bool dealInstancePDF(QString filePath);
    void processPDFFiles(const QString& dirPath,
                                     std::function<bool(const QString&)> processor,
                                     int threadCount = 1) ;
    // void processOneByOneFiles(const QStringList &fileList, std::function<bool (const QString &)> processor);
    void processMultiFiles(const QFileInfoList& fileList,
                                       std::function<bool(const QString&)> processor,
                                       int threadCount);
    void processOneByOneFiles(const QFileInfoList& fileList,
                                          std::function<bool(const QString&)> processor) ;
    void ocr(std::string imgDir, std::string imgName);
    bool dealStaticPDF(QString filePath);
private slots:


    void on_pushButton_single_static_clicked();

    void on_pushButton_single_instance_clicked();

    void on_pushButton_bat_static_clicked();

    void on_pushButton_bat_instance_clicked();

private:
    Ui::MainWindow *ui;


};

#endif // MAINWINDOW_H
